﻿Imports System.Data.SqlClient
Imports System.Text
Imports System.Windows.Forms
Imports System.Net.Mail
Imports System.Reflection
Imports System.Text.RegularExpressions
Imports System.IO
Imports Microsoft.Win32
Imports System.Globalization

Public Class ClsBDConexao
    Public Sub openDataBase()
        Dim sbSqlConexao As New StringBuilder
        Try
            sqlConn.Close()
        Catch ex As Exception

        End Try

        sbSqlConexao.Append("Password=")
        sbSqlConexao.Append(sSenhaBD)
        sbSqlConexao.Append(";Persist Security Info=True;User ID=")
        sbSqlConexao.Append(sUsuarioBD)
        sbSqlConexao.Append(";Initial Catalog=")
        sbSqlConexao.Append(sNomeBD)
        sbSqlConexao.Append(";Data Source=")
        sbSqlConexao.Append(sNomeServerBD)
        sbSqlConexao.Append(";MultipleActiveResultSets=True")
        sqlConn.ConnectionString = sbSqlConexao.ToString
        sqlConn.Open()
    End Sub
End Class
